<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.css">
    <script src="jQuery/jquery-3.3.1.js"></script>
    <script src="bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    <link rel="stylesheet" href="css/my.css">
    <title></title>
    <script type="text/javascript">
        function resetUser() {
            $.ajax({
                type: "POST",
                url: "Reset",
                data: $('#resetForm').serialize(),
                success: function (data) {
                    if (data === "false") {
                        alert("用户名已存在！请更换！");
                    } else if (data === "true") {
                        alert("修改成功");
                        window.location.reload(true);
                    } else {
                        alert("请先到首页登录！");
                    }
                },
                async: false
            })
        }

    </script>
</head>
<body>
<div class="snow">
    <div class="container">
        <!--logo导航开始-->
        <div class="head">
            <a class="ht"><img src="images/logo.jpg"/></a>
            <div class="hs">
            <span><button type="button" class="btn btn-default btn-lg">
                            <a href="#"><span class="glyphicon glyphicon-user"></span></a>
                            </button>
                <button id="hb" class="btn btn-primary btn-lg">${sessionScope.user.getUname()}</button>
            </span>
            </div>
        </div>
        <!--logo导航结束-->
        <!--导航列表开始-->
        <div class="navi-w">
            <div class="navi">
                <ul class="navi">
                    <li>
                        <a href="index.jsp">首页</a>
                    </li>
                    <li>
                        <a href="queryBook.jsp">查询订票</a>
                    </li>
                    <li>
                        <a href="#">出行向导</a>
                    </li>
                    <li class="on">
                        <a href="my.jsp">个人中心</a>
                    </li>
                </ul>
            </div>
        </div>
        <!--导航列表结束-->
        <div id="con" class="container">
            <div class="row">
                <div class="col-sm-4">
                    <ul class="nav nav-pills nav-stacked" style="max-width: 388px;text-align:center;margin-left: -15px;">
                        <li class="active"><a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" style="background-color: #e39e34">我的订单</a>
                            <div id="collapseOne" class="panel-collapse collapse in">
                                <a class="list-group-item" href="myTicket.jsp">订单查询</a>
                                <a class="list-group-item" href="myTicket.jsp">我的车票</a>
                            </div>
                        </li>
                        <li class="active"><a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" style="background-color: #e39e34">我的个人信息</a>
                            <div id="collapseTwo" class="panel-collapse collapse in">
                                <a class="list-group-item" href="myQuery.jsp">查看个人信息</a>
                                <a class="list-group-item" href="myReset.jsp">修改个人信息</a>
                                <a class="list-group-item" href="myResetPass.jsp">修改密码</a>
                            </div>
                        </li>
                        <li class="active"><a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" style="background-color: #e39e34">常用信息管理</a>
                            <div id="collapseThree" class="panel-collapse collapse in">
                                <a class="list-group-item" href="#">出行向导</a>
                                <a class="list-group-item" href="#">车票快递地址</a>
                            </div>
                        </li>
                        <li class="active"><a data-toggle="collapse" data-parent="#accordion" href="#collapseFour" style="background-color: #e39e34">贴心服务</a>
                            <div id="collapseFour" class="panel-collapse collapse in">
                                <a class="list-group-item" href="#">遗失物品查找</a>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="col-sm-8">
                    <div style="background-color:rgba(227,158,52,0.27);color: #3c3c3c;width: 40%;height: 370px;margin-top: 40px;margin-left: 27%">
                        <div style="background: #e39e34; border:1px solid #e39e34;border-radius: 5px 0px;font-size: x-large; text-align:center;line-height:50px;color:#FFFFFF">
                            <span>修改个人信息</span>
                        </div>
                        <form id="resetForm">
                            <table cellpadding="0px" cellspacing="0px" style="font-size: 20px;margin-left: 20px;">
                                <tr style="height: 60px">
                                    <td>姓名</td>
                                    <td><input type="text" name="Uname" value="${sessionScope.user.getUname()}"></td>
                                </tr>
                                <tr style="height: 60px">
                                    <td>证件类型</td>
                                    <td>
                                        <div>
                                            <select value="${sessionScope.user.getIdType()}" name="idType">
                                                <option value="二代身份证">二代身份证</option>
                                                <option value="护照 ">护照</option>
                                                <option value="港澳通行证">港澳通行证</option>
                                            </select>
                                        </div>
                                    </td>
                                <tr style="height: 60px">
                                    <td>证件号</td>
                                    <td><input type="text" name="idCard" value="${sessionScope.user.getIdCard()}"></td>
                                </tr>
                                <tr style="height: 60px">
                                    <td>手机号码</td>
                                    <td><input type="text" name="phone" value="${sessionScope.user.getPhone()}"></td>
                                </tr>
                            </table>
                            <input id="su" type="submit" value="确定" onclick="resetUser()"/>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!--底部-->
        <div class="foot">
            <p>
                <a href="#">关于我们 &nbsp;</a>|
                <a href="#">&nbsp;网站声明 </a>
            </p>
            <p>版权所有©2018 &nbsp; 计科普通一班 &nbsp;第五小组</p>
        </div>
    </div>
</div>
</body>
</html>